import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:search_people/utils/component/component.dart';
import 'package:webview_flutter/webview_flutter.dart';

import 'index.dart';

class WebViewPage extends GetView<WebController> {
  const WebViewPage({Key? key}) : super(key: key);

  // 主视图
  Widget _buildView() {
    return WebViewWidget(controller: controller.state.webCtrl);
  }

  @override
  Widget build(BuildContext context) {
    return GetBuilder<WebController>(
      builder: (_) {
        return Scaffold(
          appBar: detailAppBar(context, title: controller.state.title),
          body: SafeArea(
            child: _buildView(),
          ),
        );
      },
    );
  }
}
